//
//  StoreAPI.h
//  RainbowFM
//
//  Created by Kratos on 14/12/19.
//  Copyright (c) 2014年 RB. All rights reserved.
//  商店接口

#import <Foundation/Foundation.h>

@interface StoreAPI : NSObject

/**
 * 查询商品一级目录
 * @param userId <#userId description#>
 * @param userCode <#userCode description#>
 * @return <#return value description#>
 * @author Kratos
 */
-(void)fetchGoodsFirstCatalogWithuserId:(NSString *)userId
                               userCode:(NSString *)userCode
                                 result:(void (^)(NSArray *catalog, NSString *msg))res;

/**
 * 查询商品二级目录
 * @param userId <#userId description#>
 * @param userCode <#userCode description#>
 * @return <#return value description#>
 * @author Kratos
 */
-(void)fetchGoodsSecondCatalogWithuserId:(NSString *)userId
                               userCode:(NSString *)userCode
                          firstCatalogId:(NSString *)firstCatalogId
                                 result:(void (^)(NSArray *catalog, NSString *msg))res;

/**
 * 查询商品目录
 * @param userId <#userId description#>
 * @param userCode <#userCode description#>
 * @return <#return value description#>
 * @author Kratos
 */
-(void)fetchGoodsCatalogWithuserId:(NSString *)userId
                                userCode:(NSString *)userCode
                                  result:(void (^)(NSArray *catalogList, NSString *msg))res;


/**
 * 查询商品
 * @param userId <#userId description#>
 * @param userCode <#userCode description#>
 * @param firstCatalogId 一级目录 N
 * @param secondCatalogId 二级目录 N
 * @param key 关键字 N
 * @param sortFlag 1价格排序2销量排序 默认2 N
 * @param currentPage 当前页 Y
 * @param pageSize 每页条数 Y
 * @return <#return value description#>
 * @author Kratos
 */
-(void)searchGoodsWithuserId:(NSString *)userId
                    userCode:(NSString *)userCode
              firstCatalogId:(NSString *)firstCatalogId
             secondCatalogId:(NSString *)secondCatalogId
                         key:(NSString *)key
                    sortFlag:(NSString *)sortFlag
                 currentPage:(NSString *)currentPage
                    pageSize:(NSString *)pageSize
                      result:(void (^)(NSArray *goodsList, NSString *msg))res;

/**
 * 商品详情
 * @param userId <#userId description#>
 * @param userCode <#userCode description#>
 * @param productId 商品id
 * @return <#return value description#>
 * @author Kratos
 */
-(void)fetchGoodsDetailWithuserId:(NSString *)userId
                         userCode:(NSString *)userCode
                        productId:(NSString *)productId
                           result:(void(^)(NSArray *goodsDetail, NSString *msg))res;



/**
 * 发货退货商品库存更改
 * @param userId <#userId description#>
 * @param userCode <#userCode description#>
 * @param productId 商品id
 * @param flag 更改标志（1发货，2退货）
 * @return <#return value description#>
 * @author Kratos
 */
-(void)fetchGoodsStockWithuserId:(NSString *)userId
                        userCode:(NSString *)userCode
                       productId:(NSString *)productId
                            flag:(NSString *)flag
                          result:(void(^)(NSArray *goodsStock, NSString *msg))res;

/**
 * 商家分类
 * @param userId <#userId description#>
 * @param userCode <#userCode description#>
 * @return <#return value description#>
 * @author Kratos
 */
-(void)fetchMerchantTypeListWithuserId:(NSString *)userId
                              userCode:(NSString *)userCode
                                result:(void(^)(NSArray *typeList, NSString *msg))res;

/**
 * 查询商家列表
 * @param userId <#userId description#>
 * @param userCode <#userCode description#>
 * @param colId 栏目ID N
 * @param key 关键字 N
 * @param typeId 分类ID N
 * @param currentPage 当前页 Y
 * @param pageSize 每页条数 Y
 * @return <#return value description#>
 * @author Kratos
 */
-(void)fetchMerchantsListWithuserId:(NSString *)userId
                           userCode:(NSString *)userCode
                              colId:(NSString *)colId
                                key:(NSString *)key
                             typeId:(NSString *)typeId
                        currentPage:(NSString *)currentPage
                           pageSize:(NSString *)pageSize
                                result:(void(^)(NSArray *list, NSString *msg))res;

/**
 * 商家详情
 * @param userId <#userId description#>
 * @param userCode <#userCode description#>
 * @param merchantId 商家 ID
 * @return <#return value description#>
 * @author Kratos
 */
-(void)searchMerchantDetailWithuserId:(NSString *)userId
                             userCode:(NSString *)userCode
                           merchantId:(NSString *)merchantId
                               result:(void(^)(NSDictionary *merchant, NSString *msg))res;



@end
